package com.sample.api;

import org.springframework.beans.factory.annotation.Autowired;

import com.sample.dto.OrderDTO;
import com.sample.service.OrderService;
import com.swak.annotation.Post;
import com.swak.annotation.RestService;
import com.swak.entity.Result;

/**
 * 描述
 * 
 * @author Auto Generator
 * @date 2022-04-21T20:47:07.509267200
 */
@RestService(path = "/api/swak/order", value = "swakOrderApi")
public class OrderApi {

	@Autowired
	private OrderService orderService;

	/**
	 * 提交订单
	 * @param order
	 * @return
	 */
	@Post("/book")
	public Result<OrderDTO> book(OrderDTO order) {
		return Result.success(orderService.book(order));
	}
}
